//对外暴露配置路由(常量路由):全部用户都可以访问到的路由
// @ts-ignore
export const constantRouter = [
  {
    //登录
    path: '/login',
    component: () => import('@/views/login/index.vue'),
    name: 'login',
    meta: {
      title: '登录', //菜单标题
      hidden: true, //代表路由标题在菜单中是否隐藏  true:隐藏 false:不隐藏
      icon: 'Promotion', //菜单文字左侧的图标,支持element-plus全部图标
    },
  },
  {
    //登录成功以后展示数据的路由
    path: '/',
    component: () => import('@/layout/index.vue'),
    name: 'layout',
    meta: {
      title: '',
      hidden: false,
      icon: '',
    },
    redirect: '/home',
    children: [
      {
        path: '/home',
        component: () => import('@/views/home/index.vue'),
        meta: {
          title: '首页',
          hidden: false,
          requiresAuth: true,
          icon: 'HomeFilled',
        },
      },
    ],
  },
  {
    //404
    path: '/404',
    component: () => import('@/views/404/index.vue'),
    name: '404',
    meta: {
      title: '404',
      hidden: true,
      requiresAuth: true,
      icon: 'DocumentDelete',
    },
  },
  {
    path: '/screen',
    component: () => import('@/views/screen/index.vue'),
    name: 'screen',
    meta: {
      title: 'screen',
      hidden: false,
      requiresAuth: true,
      icon: 'Platform',
    },
  },
  {
    path: '/acl',
    component: () => import('@/layout/index.vue'),
    name: 'Acl',
    meta: {
      title: '权限管理',
      icon: 'Lock',
    },
    redirect: '/acl/user',
    children: [
      {
        path: '/acl/user',
        component: () => import('@/views/acl/user.vue'),
        name: 'User',
        meta: {
          title: '用户管理',
          icon: 'User',
          requiresAuth: true,
        },
      },
      {
        path: '/acl/role',
        component: () => import('@/views/acl/role.vue'),
        name: 'Role',
        meta: {
          title: '角色管理',
          icon: 'UserFilled',
          requiresAuth: true,
        },
      },
      {
        path: '/acl/permission',
        component: () => import('@/views/acl/permission.vue'),
        name: 'Permission',
        meta: {
          title: '权限管理',
          icon: 'Monitor',
          requiresAuth: true,
        },
      },
      {
        path: '/acl/banner',
        component: () => import('@/views/acl/banner.vue'),
        name: 'banner',
        meta: {
          title: '轮播图管理',
          icon: 'Lollipop',
          requiresAuth: true,
        },
      },
    ],
  },
  {
    path: '/product',
    component: () => import('@/layout/index.vue'),
    name: 'Product',
    meta: {
      title: '影片管理',
      icon: 'Goods',
    },
    redirect: '/product/trademark',
    children: [
      {
        path: '/product/filmInfo',
        component: () => import('@/views/product/filmInfo/index.vue'),
        name: 'filmInfo',
        meta: {
          title: '电影信息',
          icon: 'ShoppingCartFull',
          requiresAuth: true,
        },
      },
      {
        path: '/product/showInfo',
        component: () => import('@/views/product/showInfo/index.vue'),
        name: 'showInfo',
        meta: {
          title: '放映信息',
          icon: 'ChromeFilled',
          requiresAuth: true,
        },
      },
      {
        path: '/product/orderInfo',
        component: () => import('@/views/product/orderInfo/index.vue'),
        name: 'orderInfo',
        meta: {
          title: '订单信息',
          icon: 'Orange',
          requiresAuth: true,
        },
      },
    ],
  },
  {
    path: '/system',
    component: () => import('@/layout/index.vue'),
    name: 'System',
    meta: {
      title: '系统管理',
      icon: 'Setting',
      requiresAuth: true,
    },
    redirect: '/system/config',
    children: [
      {
        path: '/system/config',
        component: () => import('@/views/system/config.vue'),
        name: 'Config',
        meta: {
          title: '系统配置',
          icon: 'Setting',
          requiresAuth: true,
        },
      },
      {
        path: '/system/log',
        component: () => import('@/views/system/log.vue'),
        name: 'Log',
        meta: {
          title: '日志与审计',
          icon: 'Document',
          requiresAuth: true,
        },
      },
      {
        path: '/system/data',
        component: () => import('@/views/system/data.vue'),
        name: 'Data',
        meta: {
          title: '数据管理',
          icon: 'DataLine',
          requiresAuth: true,
        },
      },
    ],
  },
]
export const asnycRoute = []
